/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package testGUI;

import GUI.LoginForm;
import GUI.UserCard;
import functions.Dogs;
import functions.Users;
import javax.swing.UIManager;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.swingui.TestRunner;
import model.Database;
import model.Dog;
import model.User;

/**
 *
 * @author JArik
 */
public class testUserCard extends TestCase{

    public testUserCard(String name)
    {
        super(name);
    }

    public static void main(String [] args)
    {
        //TestRunner runner = new TestRunner();
        //TestSuite suite = new TestSuite();
        //suite.addTest(new testUserCard("testVisits"));
        
    }

    @SuppressWarnings("empty-statement")
    public void testVisits() throws Exception
    {
        UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        Database.connect("dogy","root", "");
        Users users = new Users();
        User user = users.startSearch().get(0);
        UserCard card = new UserCard(null, user);
        card.setMinimumSize(card.getPreferredSize());
        card.setVisible(true);
        while(card.isVisible()) {
            Thread.sleep(100);
        }
        
    }
}
